﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace RonaldCamcam.XBeeFramework.Api
{
    public class Command
    {
        public string ATCommand { get; set; }
        public XBeeResponse Acknowledge { get; set; }
        public string CheckSum { get; set; }
        public string Status { get; set; }
        public string HexPayload { get; set; }

        public List<byte> Value { get; set; }
    }

    public class Request : Command
    {

    }

    public class Response : Command
    {
        public const string OK = "OK";
        public const string ERROR = "Error";
        public const string INVALID_COMMAND = "Invalid Command";
        public const string INVALID_PARAMETER = "Invalid Parameter";
        public const string INVALID_CHECKSUM = "Invalid CheckSum";
        public const string INVALID_RESPONSE = "Invalid Response";
        public const string INVALID_DATA = "Invalid Data";
        public const string READ_TIME_OUT_EXPIRED = "Read Time Out Expired";
        public const string WRITE_TIME_OUT_EXPIRED = "Write Time Out Expired";                

        public Response()
        {
            Status = string.Empty;
            HexPayload = string.Empty;
            Value = new List<byte>();
        }
    }

    public class RemoteResponse : Command
    {
        public RemoteResponse()
        {
            Status = string.Empty;
            HexPayload = string.Empty;
            Value = new List<byte>();
        }
    }
}
